Profiling large-scale lazy functional programs
نویسنده
چکیده
The LOLITA natural language processor is an example of one of the ever-increasing number of large-scale systems written entirely in a functional programming language. The system consists of over 47,000 lines of Haskell code (excluding comments) and is able to perform a wide range of tasks such as semantic and pragmatic analysis of text, information extraction and query analysis. The efficiency of such a system is critical; interactive tasks (such as query analysis) must ensure that the user is not inconvenienced by long pauses, and batch mode tasks (such as information extraction) must ensure that an adequate throughput can be achieved. For the past three years the profiling tools supplied with GHC and HBC have been used to analyse and reason about the complexity of the LOLITA system. There have been good results, however experience has shown that in a large system the profiling life-cycle is often too long to make detailed analysis possible, and the results are often misleading. In response to these problems a profiler has been developed which allows the complete set of program costs to be recorded in so-called cost-centre stacks. These program costs are then analysed using a post-processing tool to allow the developer to explore the costs of the program in ways that are either not possible with existing tools or would require repeated compilations and executions of the program. The modifications to the Glasgow Haskell compiler based on detailed cost semantics and an efficient implementation scheme are discussed. The results of using this new profiling tool in the analysis of a number of Haskell programs are also presented. The overheads of the scheme are discussed and the benefits of this new system are considered. An outline is also given of how this approach can be modified to assist with the tracing and debugging of programs.
منابع مشابه
The Results of: Profiling Large-Scale Lazy Functional Programs
Abst rac t . At the High Performance Functional Computing conference in Denver [MoJ95] a new approach to profiling was presented, this allowed the complete set of program costs to be recorded in so-called cost centre stacks. It was proposed that these program costs could then be manipulated using a post-processor which would speed up the task of profiling a Haskell program and would also produc...
متن کاملHeap Profiling of Lazy Functional Programs
We describe the design, implementation and use of a new kind of profiling tool that yields valuable information about the memory use of lazy functional programs. The tool has two parts: a modified functional language implementation which generates profiling information during the execution of programs, and a separate program which converts this information to graphical form. With the aid of pro...
متن کاملProfiling Lazy Functional Programs
Prooling tools, which measure and display the dynamic space and time behaviour of programs, are essential for identifying execution bottlenecks. A variety of such tools exist for conventional languages, but almost none for non-strict functional languages. There is a good reason for this: lazy evaluation means that the program is executed in an order which is not immediately apparent from the so...
متن کاملInheritance Profiles of Process Functional Programs
An execution profiling attempts to provide feedback by reporting to the programmer information about inefficiencies within the program. Instead of writing whole code highly optimized, the programmer can initially write simple, maintainable code without much concern for efficiency. Profiling is an effective tool for finding hot spots in a program or sections of code that consumes most of the com...
متن کاملLoad Bounding for Implicit Parallelism
It is well known that exploiting parallelism beyond the available machine parallelism can lead to vastly increased resource requirements. Programs which can run in linear space under a sequential execution regime may require exponential space in the context of unrestricted parallelism. In this paper we present an efficient adaptive software solution for the problem of avoiding excessive paralle...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- J. Funct. Program.
دوره 8 شماره
صفحات -
تاریخ انتشار 1996